Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/revoke permission to all #932

Merged

Conversation

rafal2228
Copy link
Contributor

Motivation and context

Synpress seemed to be missing handlers for revoking access to NFT collections - follow up actions for confirmPermissionToApproveAll. This PR aims at adding them

Quality checklist

  • I have performed a self-review of my code.
  • If it is a core feature, I have added thorough e2e tests.

@cypress cypress bot mentioned this pull request Oct 17, 2023
@duckception
Copy link
Contributor

Hey, thanks for the PR! ❤️

CI passed ✅

@duckception duckception merged commit de76346 into Synthetixio:dev Oct 18, 2023
31 of 37 checks passed
duckception added a commit that referenced this pull request Oct 18, 2023
* Remove leftover TODOs

* Remove text based locators

* Add `Known problems with MetaMask` section

* Remove Promise wrap from `cy.setupMetamask()` (#927)

* Fix localized Chrome's extension id (#928)

* Fix localized Chrome's extension id

* Improve id handling

---------

Co-authored-by: Piotr Frankowski <piotr@f-dev.io>

* Lint

* Feature/revoke permission to all (#932)

* Fix typo in Permission word

* Add permission revoking actions

* Add tests for permission revoking actions

* Regenerate synpress commands file

---------

Co-authored-by: Peter F <pietras93@gmail.com>
Co-authored-by: Piotr Frankowski <piotr@f-dev.io>
Co-authored-by: Rafał Majchrzak <rafal2228@gmail.com>
@duckception
Copy link
Contributor

@rafal2228 Hey, a new Sypress release with changes from this PR is available under the 3.7.2-beta.8 tag! ✨

@rafal2228
Copy link
Contributor Author

@rafal2228 Hey, a new Sypress release with changes from this PR is available under the 3.7.2-beta.8 tag! ✨

That's awesome! Thank you @duckception ❤️

duckception added a commit that referenced this pull request Nov 3, 2023
* Remove leftover TODOs

* Remove text based locators

* Add `Known problems with MetaMask` section

* Remove Promise wrap from `cy.setupMetamask()` (#927)

* Fix localized Chrome's extension id (#928)

* Fix localized Chrome's extension id

* Improve id handling

---------

Co-authored-by: Piotr Frankowski <piotr@f-dev.io>

* Lint

* Feature/revoke permission to all (#932)

* Fix typo in Permission word

* Add permission revoking actions

* Add tests for permission revoking actions

* Regenerate synpress commands file

* Add `switchNetwork` option to `acceptAccess` function

---------

Co-authored-by: Peter F <pietras93@gmail.com>
Co-authored-by: Piotr Frankowski <piotr@f-dev.io>
Co-authored-by: Rafał Majchrzak <rafal2228@gmail.com>
duckception added a commit that referenced this pull request Jan 25, 2024
* Remove leftover TODOs

* Remove text based locators

* Add `Known problems with MetaMask` section

* Remove Promise wrap from `cy.setupMetamask()` (#927)

* Fix localized Chrome's extension id (#928)

* Fix localized Chrome's extension id

* Improve id handling

---------

Co-authored-by: Piotr Frankowski <piotr@f-dev.io>

* Lint

* Feature/revoke permission to all (#932)

* Fix typo in Permission word

* Add permission revoking actions

* Add tests for permission revoking actions

* Regenerate synpress commands file

* Add `switchNetwork` option to `acceptAccess` function

* Add new release section to README

* Use `goerli` for testing (#1082)

* Use `goerli` for testing

* Trigger tests

* Add `shouldWaitForPopupClosure` option to approvals and txs (#1081)

---------

Co-authored-by: Peter F <pietras93@gmail.com>
Co-authored-by: Piotr Frankowski <piotr@f-dev.io>
Co-authored-by: Rafał Majchrzak <rafal2228@gmail.com>
frazarshad added a commit to agoric-labs/synpress that referenced this pull request Mar 13, 2024
* Remove leftover TODOs

* Remove text based locators

* Add `Known problems with MetaMask` section

* Remove Promise wrap from `cy.setupMetamask()` (Synthetixio#927)

* Fix localized Chrome's extension id (Synthetixio#928)

* Fix localized Chrome's extension id

* Improve id handling

---------

Co-authored-by: Piotr Frankowski <piotr@f-dev.io>

* Lint

* Feature/revoke permission to all (Synthetixio#932)

* Fix typo in Permission word

* Add permission revoking actions

* Add tests for permission revoking actions

* Regenerate synpress commands file

* Add `switchNetwork` option to `acceptAccess` function

* Add new release section to README

* Use `goerli` for testing (Synthetixio#1082)

* Use `goerli` for testing

* Trigger tests

* Add `shouldWaitForPopupClosure` option to approvals and txs (Synthetixio#1081)

* feature: intial setup for integration of keplr

* chore: use Error object for throwing an error related to invalid extension name

* Adding Keplr Interaction for Importing Wallet using Private Key  (#2)

* feature: adding keplr interaction for creating an account using private key

* feature: keplr interaction for importing an existing wallet and creating a new wallet

* fix: fixed implementation of waitAndClickByText to perform exact matching

---------

Co-authored-by: Fraz Arshad <fraz.arshad12@gmail.com>

* Disconnect Wallet Interaction  (#7)

* chore: removing call to acceptAccess function

* feature: adding intereaction for disconnecting with wallet

* remve the default arg

* Added Interaction to handle rejection of wallet connection (#8)

* feat: added code to handle reject wallet access

* feat: added test case for reject wallet access + modified test structure

* Include code for Offer up Dapp (#10)

* feat(ci): Included ui/ and contract/ from offer-up-dapp (with changes)

* refactor: moved ui/ and contract/ to tools/ folder

* Updates to CI/CD to use Agoric chain and Offer up DApp (#4)

* feat(ci): Included ui/ and contract/ from offer-up-dapp (with changes)

* feat(ci): Updated CI to use agoric chain + offer up dapp

* fix(ci): updated scripts in package.json

* refactor(ci): Moved ui/ and contract/ to tools/

* refactor: moved json-server-db.json to tools folder

* Single Screen Interaction, Approve Button Fix and Code Cleanup (#9)

* chore: organize code in playwright.keplr.js and remove not used states

* chore: resolve merge conflicts with dev branch

* chore: using a consistent and more intention revealing name for a helper function

* chore: adding a test case for validating the switchToExtensionWindow function

* chore: change selector for Approve button on connecting with wallet UI

* chore: addressing PR comments

* Interaction for transaction rejection (#12)

* feat: added logic for transaction rejection

* feat: added test for transaction rejection

* fix: typo in test name

* chore:remove call to switchToKeplrWindow in metamask.js (#16)

* Abstracting Calls to Switching Extension in Keplr Helper Methods (#13)

* chore: abstracting calls to switching to keplr window in keplr helper functions

* chore: removing unnecessary awaits with sync function

* Enable setup of the keplr extension in the beforeAll hook for cypress (#14)

* fix: added code to handle setup of keplr wallet beforehand

* chore: lint fixes

* Add command to switch to another wallet (#18)

* feat: interaction to switch wallet

* chore: fixes for await async

* Getting Wallet Address (#17)

* feat: initial working setup for retrieving wallet address

* chore:code cleanup

* feat: interaction to switch wallet

* chore: simplifying switching screens in import wallet flow

* chore format code with prettier

* chore: moving get wallet address test case in the main context

* chore: fixes for await async

* chore: address PR comments

---------

Co-authored-by: Fraz Arshad <fraz.arshad12@gmail.com>

* Added Interaction to get the value of a certain token (#19)

* feat: added command to get tokens

* chore: await/async fixes

* Updates to CI/CD flow (#20)

* ci: new docker ci file for keplr

* ci: using docker workflow instead of debug workflow temporarily

* ci: updated config to have not retires in ci

* Adding Selecting Chain Interaction And Flow Improvements (#21)

* chore: changing the flow of test cases; starting by creating a new wallet rather than importing

* feature: adding behavior in import wallet flow to select a chain when importing/creating wallet

* feature: adding helper methods to click elements in a reliable way

* chore: using helper methods inside keplr.js

* chore: handling edge case for grabbing token values when values are large numbers containing commas

* chore: updating selector for getting wallet address and adding test cases to validate the behavior

* chore: addressing PR comments

* chore: addressing PR comments

* chore: replacing Agoric local with Agoric localhost

* feat: included settings to setup npm (#22)

* refactor: changed args for setupWallet (#24)

* Added automatic linting to the repository (#23)

* style:changing settings for linting

* style: fixes to lint + styling throughout repo

* Enabled CI Pipeline for NPM deployment (#25)

* feat: release workflow enabled

* feat: added CI cache folders to .npmignore

* chore: revert back to master after testing

---------

Co-authored-by: duckception <spidiritsu@gmail.com>
Co-authored-by: Peter F <pietras93@gmail.com>
Co-authored-by: Piotr Frankowski <piotr@f-dev.io>
Co-authored-by: Rafał Majchrzak <rafal2228@gmail.com>
Co-authored-by: rabi-siddique <rabisiddique27@gmail.com>
Co-authored-by: Rabi Siddique <60459172+rabi-siddique@users.noreply.github.com>
frazarshad added a commit to agoric-labs/synpress that referenced this pull request Mar 14, 2024
* Remove leftover TODOs

* Remove text based locators

* Add `Known problems with MetaMask` section

* Remove Promise wrap from `cy.setupMetamask()` (Synthetixio#927)

* Fix localized Chrome's extension id (Synthetixio#928)

* Fix localized Chrome's extension id

* Improve id handling

---------

Co-authored-by: Piotr Frankowski <piotr@f-dev.io>

* Lint

* Feature/revoke permission to all (Synthetixio#932)

* Fix typo in Permission word

* Add permission revoking actions

* Add tests for permission revoking actions

* Regenerate synpress commands file

* Add `switchNetwork` option to `acceptAccess` function

* Add new release section to README

* Use `goerli` for testing (Synthetixio#1082)

* Use `goerli` for testing

* Trigger tests

* Add `shouldWaitForPopupClosure` option to approvals and txs (Synthetixio#1081)

* feature: intial setup for integration of keplr

* chore: use Error object for throwing an error related to invalid extension name

* Adding Keplr Interaction for Importing Wallet using Private Key  (#2)

* feature: adding keplr interaction for creating an account using private key

* feature: keplr interaction for importing an existing wallet and creating a new wallet

* fix: fixed implementation of waitAndClickByText to perform exact matching

---------

Co-authored-by: Fraz Arshad <fraz.arshad12@gmail.com>

* Disconnect Wallet Interaction  (#7)

* chore: removing call to acceptAccess function

* feature: adding intereaction for disconnecting with wallet

* remve the default arg

* Added Interaction to handle rejection of wallet connection (#8)

* feat: added code to handle reject wallet access

* feat: added test case for reject wallet access + modified test structure

* Include code for Offer up Dapp (#10)

* feat(ci): Included ui/ and contract/ from offer-up-dapp (with changes)

* refactor: moved ui/ and contract/ to tools/ folder

* Updates to CI/CD to use Agoric chain and Offer up DApp (#4)

* feat(ci): Included ui/ and contract/ from offer-up-dapp (with changes)

* feat(ci): Updated CI to use agoric chain + offer up dapp

* fix(ci): updated scripts in package.json

* refactor(ci): Moved ui/ and contract/ to tools/

* refactor: moved json-server-db.json to tools folder

* Single Screen Interaction, Approve Button Fix and Code Cleanup (#9)

* chore: organize code in playwright.keplr.js and remove not used states

* chore: resolve merge conflicts with dev branch

* chore: using a consistent and more intention revealing name for a helper function

* chore: adding a test case for validating the switchToExtensionWindow function

* chore: change selector for Approve button on connecting with wallet UI

* chore: addressing PR comments

* Interaction for transaction rejection (#12)

* feat: added logic for transaction rejection

* feat: added test for transaction rejection

* fix: typo in test name

* chore:remove call to switchToKeplrWindow in metamask.js (#16)

* Abstracting Calls to Switching Extension in Keplr Helper Methods (#13)

* chore: abstracting calls to switching to keplr window in keplr helper functions

* chore: removing unnecessary awaits with sync function

* Enable setup of the keplr extension in the beforeAll hook for cypress (#14)

* fix: added code to handle setup of keplr wallet beforehand

* chore: lint fixes

* Add command to switch to another wallet (#18)

* feat: interaction to switch wallet

* chore: fixes for await async

* Getting Wallet Address (#17)

* feat: initial working setup for retrieving wallet address

* chore:code cleanup

* feat: interaction to switch wallet

* chore: simplifying switching screens in import wallet flow

* chore format code with prettier

* chore: moving get wallet address test case in the main context

* chore: fixes for await async

* chore: address PR comments

---------

Co-authored-by: Fraz Arshad <fraz.arshad12@gmail.com>

* Added Interaction to get the value of a certain token (#19)

* feat: added command to get tokens

* chore: await/async fixes

* Updates to CI/CD flow (#20)

* ci: new docker ci file for keplr

* ci: using docker workflow instead of debug workflow temporarily

* ci: updated config to have not retires in ci

* Adding Selecting Chain Interaction And Flow Improvements (#21)

* chore: changing the flow of test cases; starting by creating a new wallet rather than importing

* feature: adding behavior in import wallet flow to select a chain when importing/creating wallet

* feature: adding helper methods to click elements in a reliable way

* chore: using helper methods inside keplr.js

* chore: handling edge case for grabbing token values when values are large numbers containing commas

* chore: updating selector for getting wallet address and adding test cases to validate the behavior

* chore: addressing PR comments

* chore: addressing PR comments

* chore: replacing Agoric local with Agoric localhost

* feat: included settings to setup npm (#22)

* refactor: changed args for setupWallet (#24)

* Added automatic linting to the repository (#23)

* style:changing settings for linting

* style: fixes to lint + styling throughout repo

* Enabled CI Pipeline for NPM deployment (#25)

* feat: release workflow enabled

* feat: added CI cache folders to .npmignore

* chore: revert back to master after testing

* Fix for switching between keplr windows with same url (#27)

* fix: checking added for window instance

* test: test added for edge case

* fix: added click after timeout to resolve flakiness (#28)

* Updated README.md (#29)

* docs: updated README.md

* docs: added env section to readme

* docs: 24 words memonics

---------

Co-authored-by: duckception <spidiritsu@gmail.com>
Co-authored-by: Peter F <pietras93@gmail.com>
Co-authored-by: Piotr Frankowski <piotr@f-dev.io>
Co-authored-by: Rafał Majchrzak <rafal2228@gmail.com>
Co-authored-by: rabi-siddique <rabisiddique27@gmail.com>
Co-authored-by: Rabi Siddique <60459172+rabi-siddique@users.noreply.github.com>
drptbl added a commit that referenced this pull request May 28, 2024
* Remove leftover TODOs

* Remove text based locators

* Add `Known problems with MetaMask` section

* Remove Promise wrap from `cy.setupMetamask()` (#927)

* Fix localized Chrome's extension id (#928)

* Fix localized Chrome's extension id

* Improve id handling

---------

Co-authored-by: Piotr Frankowski <piotr@f-dev.io>

* Lint

* Feature/revoke permission to all (#932)

* Fix typo in Permission word

* Add permission revoking actions

* Add tests for permission revoking actions

* Regenerate synpress commands file

* Add `switchNetwork` option to `acceptAccess` function

* Add new release section to README

* Use `goerli` for testing (#1082)

* Use `goerli` for testing

* Trigger tests

* Add `shouldWaitForPopupClosure` option to approvals and txs (#1081)

* fix: fixed metamask commands to support v11.15.5 (#1132)

* release: v3.7.2-beta.9

Signed-off-by: Jakub <ci@drptbl.dev>

* feature: updated lib to support metamask 11.15.5 version

* use latest pnpm

Signed-off-by: drptbl <jakub.mucha@icloud.com>

* update metamask version

Signed-off-by: drptbl <jakub.mucha@icloud.com>

* added packageManager in package.json

* textcase fix

* click on proceedAnyway

Signed-off-by: r3kt.eth <so@r3kt.io>

* add pnpm

Signed-off-by: r3kt.eth <so@r3kt.io>

* version update

Signed-off-by: r3kt.eth <so@r3kt.io>

---------

Signed-off-by: Jakub <ci@drptbl.dev>
Signed-off-by: drptbl <jakub.mucha@icloud.com>
Signed-off-by: r3kt.eth <so@r3kt.io>
Co-authored-by: Jakub <ci@drptbl.dev>
Co-authored-by: Harsh Rathi <harsh@FV3P2P7KXV.local>
Co-authored-by: drptbl <jakub.mucha@icloud.com>
Co-authored-by: r3kt.eth <so@r3kt.io>

---------

Signed-off-by: Jakub <ci@drptbl.dev>
Signed-off-by: drptbl <jakub.mucha@icloud.com>
Signed-off-by: r3kt.eth <so@r3kt.io>
Co-authored-by: duckception <spidiritsu@gmail.com>
Co-authored-by: Peter F <pietras93@gmail.com>
Co-authored-by: Piotr Frankowski <piotr@f-dev.io>
Co-authored-by: Rafał Majchrzak <rafal2228@gmail.com>
Co-authored-by: Harsh R <53080940+fullstackninja864@users.noreply.github.com>
Co-authored-by: Harsh Rathi <harsh@FV3P2P7KXV.local>
Co-authored-by: r3kt.eth <so@r3kt.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants